import { createApp } from "vue";
import "element-plus/dist/index.css";
// import "./assets/style/element-variables.scss"; // 引入自定义变量文件
import App from "./App.vue";
import router from "./router";
import Pinia from "./store";
// import * as echarts from "echarts";
import VChart from "vue-echarts";
import "@/assets/css/font.css";
//svg
import "virtual:svg-icons-register";

import ElementPlus from "element-plus";
import zhCn from 'element-plus/es/locale/lang/zh-cn' // 引入中文语言包

// import "element-plus/dist/index.css"; //element-plus
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

import SvgIcon from "./components/common/SvgIcon.vue";
const app = createApp(App);

//注册element-plus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

//组件
app.component("GsvgIcon", SvgIcon);

app.use(Pinia);
app.use(router);
//引入VChart
app.component("VChart", VChart);
// app.use(ElementPlus);
app.use(ElementPlus, { locale: zhCn }) // 使用 Element Plus 的内置中文语言配置

app.mount("#app");
